package com.felight.servlets;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class Example
 */
public class Example extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public Example() {
        super();
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println("Successfully executed....");
		PrintWriter writer = response.getWriter();
		writer.write("<html><body><h1>THE ALCHEMIST<br/></h1>");
		writer.write("<h4>by,<span style=color:red>Paulo Coelho</span></h4>");
		writer.write("<div style = color:#D2691E><p>If I became a <b>monster</b> today, and decided to kill them, one by one, they would become aware only after most of the flock had been slaughtered,thought the boy. They trust me, and they've forgotten how to rely on their own instincts, because I lead them to nourishment.</p>");
		writer.write("<p>The boy was surprised at his thoughts. Maybe the <b>church</b>, with the sycamore growing from within, had been haunted. It had caused him to have the same dream for a second time, and it was causing him to feel anger toward his faithful companions. He drank a bit from the wine that remained from his dinner of the night before, and he gathered his jacket closer to his body. He knew that a few hours from now, with the sun at its zenith, the heat would be so great that he would not be able to lead hisflock across the fields. It was the time of day when all of Spain slept during the summer. The heat lasted until nightfall, and all that time he had to carry his jacket. But when he thought to complain about the burden of its weight, he remembered that, because he had the jacket, he had withstood the cold of the dawn.</p>");
		writer.write("<p><i>People from all over the world have passed through this village, son,</i> said his father.<i> They come in search of new things, but when they leave they are basically the same people they were when they arrived. They climb the mountain to see the castle, and they wind up thinking that the past was better than what we have now. They have blond hair, or dark skin, but basically they're the same as the people who live right here</i></p>.");
		writer.write("</body></html>");
	}

}
